/*
 Navicat Premium Dump SQL

 Source Server         : mac
 Source Server Type    : MySQL
 Source Server Version : 80036 (8.0.36)
 Source Host           : localhost:3306
 Source Schema         : hgkj-admin

 Target Server Type    : MySQL
 Target Server Version : 80036 (8.0.36)
 File Encoding         : 65001

 Date: 26/07/2025 22:07:00
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
  `menu_id` bigint NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
  `menu_name` varchar(50) NOT NULL COMMENT '菜单名称',
  `parent_id` bigint DEFAULT '0' COMMENT '父菜单ID',
  `order_num` int DEFAULT '0' COMMENT '显示顺序',
  `path` varchar(200) DEFAULT '' COMMENT '路由地址',
  `component` varchar(255) DEFAULT NULL COMMENT '组件路径',
  `query` varchar(255) DEFAULT NULL COMMENT '路由参数',
  `menu_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '' COMMENT '菜单类型（M目录 C菜单 F按钮 A 接口api）',
  `visible` char(1) DEFAULT '0' COMMENT '菜单状态（0显示 1隐藏）',
  `status` char(1) DEFAULT '0' COMMENT '菜单状态（0正常 1停用）',
  `perms` varchar(100) DEFAULT NULL COMMENT '权限标识',
  `icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '菜单图标',
  `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) DEFAULT '' COMMENT '备注',
  `title` varchar(255) DEFAULT NULL COMMENT 'i18国际化',
  PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=125 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='菜单权限表';

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (1, '系统管理', 0, 1, 'system', NULL, NULL, 'M', '0', '0', NULL, 'Setting', 'admin', '2025-06-22 01:42:48', 'admin', '2025-06-22 01:42:55', '系统管理目录', 'system.title');
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (2, '系统监控', 0, 4, 'monitor', NULL, NULL, 'M', '0', '1', NULL, 'monitor', 'admin', '2025-06-22 01:45:29', '', NULL, '系统监控目录', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (3, '系统工具', 0, 3, 'tool', NULL, NULL, 'M', '0', '1', NULL, 'tool', 'admin', '2025-06-22 01:46:09', '', NULL, '系统工具目录', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (100, '用户管理', 1, 1, 'user', 'system/user/index', NULL, 'C', '0', '0', 'system.user.list', 'User', 'admin', '2025-06-29 16:05:49', 'admin', '2025-07-24 23:24:55', '用户管理', 'system.user');
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (101, '角色管理', 1, 2, 'role', 'system/role/index', NULL, 'C', '0', '0', 'system.role.list', 'Sugar', 'admin', '2025-06-29 16:05:52', 'admin', '2025-07-24 23:24:38', '角色管理', 'system.role');
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (102, '菜单管理', 1, 3, 'menu', 'system/menu/list', NULL, 'C', '0', '0', 'system.menu.list', 'Discount', 'admin', '2025-06-29 16:05:54', 'admin', '2025-07-24 23:23:30', '菜单管理', 'system.menu');
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (107, '演示模式', 0, 10, 'plus', NULL, NULL, 'M', '0', '0', NULL, 'Plus', 'admin', '2025-07-24 22:44:22', 'admin', '2025-07-25 17:03:45', '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (109, '李斯特', 107, 1, 'demo', 'system/demo/index', NULL, 'C', '0', '0', NULL, 'PictureRounded', 'admin', '2025-07-24 22:54:52', 'admin', '2025-07-25 17:03:41', '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (111, 'jump碗', 107, 0, 'jumpOne', 'system/demo/jumpOne', '{\"id\":-10}', 'C', '0', '0', NULL, 'Right', 'admin', '2025-07-25 17:05:24', 'admin', '2025-07-25 18:20:03', '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (112, '新增菜单', 102, 0, '', NULL, NULL, 'F', '0', '0', 'system.menu.add', NULL, 'admin', '2025-07-25 18:42:45', 'admin', '2025-07-25 18:43:36', '', 'add');
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (113, '修改菜单', 102, 1, '', NULL, NULL, 'F', '0', '0', 'system.menu.edit', NULL, 'admin', '2025-07-25 18:43:58', 'admin', '2025-07-25 18:44:07', '', 'edit');
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (114, '删除菜单', 102, 2, '', NULL, NULL, 'F', '0', '0', 'system.menu.remove', NULL, 'admin', '2025-07-25 18:44:28', '', NULL, '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (115, '新增角色', 101, 0, '', NULL, NULL, 'F', '0', '0', 'system.role.add', NULL, 'admin', '2025-07-25 19:14:56', '', NULL, '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (116, '修改角色', 101, 1, '', NULL, NULL, 'F', '0', '0', 'system.role.edit', NULL, 'admin', '2025-07-25 19:15:08', '', NULL, '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (117, '删除角色', 101, 2, '', NULL, NULL, 'F', '0', '0', 'system.role.remove', NULL, 'admin', '2025-07-25 19:15:20', '', NULL, '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (118, '分配权限', 101, 3, '', NULL, NULL, 'F', '0', '0', 'system.role.assign', NULL, 'admin', '2025-07-25 19:15:46', 'admin', '2025-07-25 19:15:52', '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (119, '新增用户', 100, 0, '', NULL, NULL, 'F', '0', '0', 'system.user.add', NULL, 'admin', '2025-07-26 17:52:53', '', NULL, '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (120, '修改用户', 100, 1, '', NULL, NULL, 'F', '0', '0', 'system.user.edit', NULL, 'admin', '2025-07-26 17:53:14', 'admin', '2025-07-26 17:54:11', '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (121, '删除用户', 100, 2, '', NULL, NULL, 'F', '0', '0', 'system.user.remove', NULL, 'admin', '2025-07-26 17:53:31', 'admin', '2025-07-26 17:54:17', '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (122, '修改密码', 100, 4, '', NULL, NULL, 'F', '0', '0', 'system.user.updatePassword', NULL, 'admin', '2025-07-26 17:54:01', '', NULL, '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (123, '变更状态', 100, 3, '', NULL, NULL, 'F', '0', '0', 'system.user.freeze', NULL, 'admin', '2025-07-26 17:54:49', 'admin', '2025-07-26 17:54:54', '', NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `title`) VALUES (124, '分配角色', 100, 5, '', NULL, NULL, 'F', '0', '0', 'system.user.assign', NULL, 'admin', '2025-07-26 19:12:26', '', NULL, '', NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `role_id` bigint NOT NULL AUTO_INCREMENT COMMENT '角色ID',
  `role_name` varchar(30) NOT NULL COMMENT '角色名称',
  `role_key` varchar(100) NOT NULL COMMENT '角色权限字符串',
  `role_sort` int NOT NULL COMMENT '显示顺序',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT '角色状态（0正常 1停用）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '0' COMMENT '删除标志（0代表存在 1代表删除）',
  `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='角色信息表';

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` (`role_id`, `role_name`, `role_key`, `role_sort`, `status`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, '超级管理员', 'admin', 1, '0', '0', 'admin', '2025-06-22 01:39:19', 'admin', '2025-06-22 01:39:27', '超级管理员');
INSERT INTO `sys_role` (`role_id`, `role_name`, `role_key`, `role_sort`, `status`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (50, '测试角色', 'test1', 10, '0', '0', '', '2025-07-13 10:39:53', 'admin', '2025-07-26 22:06:02', NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
  `role_id` bigint NOT NULL COMMENT '角色ID',
  `menu_id` bigint NOT NULL COMMENT '菜单ID',
  PRIMARY KEY (`role_id`,`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='角色和菜单关联表';

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (1, 1);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (1, 2);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (1, 3);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (1, 100);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (1, 101);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (1, 102);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (50, 1);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (50, 101);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (50, 102);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (50, 107);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (50, 109);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (50, 111);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (50, 112);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (50, 113);
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (50, 114);
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `user_id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `user_name` varchar(30) NOT NULL COMMENT '账号',
  `user_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '00' COMMENT '用户类型',
  `avatar` varchar(255) DEFAULT NULL COMMENT '用户头像',
  `password` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '密码',
  `status` char(1) NOT NULL DEFAULT '0' COMMENT '账号状态0正常 1停用',
  `del_flag` char(1) NOT NULL DEFAULT '0' COMMENT '删除标记0正常 1删除',
  `last_login_ip` varchar(50) DEFAULT NULL COMMENT '最后登陆IP',
  `last_login_date` datetime DEFAULT NULL COMMENT '最后登陆时间',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `update_by` varchar(50) DEFAULT NULL COMMENT '修改人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `salt` varchar(30) NOT NULL COMMENT '随机盐',
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=103 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` (`user_id`, `user_name`, `user_type`, `avatar`, `password`, `status`, `del_flag`, `last_login_ip`, `last_login_date`, `create_by`, `update_by`, `create_time`, `update_time`, `remark`, `salt`) VALUES (1, 'admin', '00', NULL, '9e3c95c5f49a39af26e26e248f891d01e5082e74', '0', '0', '127.0.0.1', '2025-06-21 16:23:08', 'admin', 'admin', '2025-06-21 16:23:54', '2025-06-21 16:24:00', '超级管理员', '1750494088131');
INSERT INTO `sys_user` (`user_id`, `user_name`, `user_type`, `avatar`, `password`, `status`, `del_flag`, `last_login_ip`, `last_login_date`, `create_by`, `update_by`, `create_time`, `update_time`, `remark`, `salt`) VALUES (100, 'test', '00', NULL, '25b0b16ca249945c5cfadc325866f8f1a14cec10', '0', '0', NULL, NULL, NULL, NULL, '2025-07-17 18:07:00', NULL, NULL, '1753526526053');
INSERT INTO `sys_user` (`user_id`, `user_name`, `user_type`, `avatar`, `password`, `status`, `del_flag`, `last_login_ip`, `last_login_date`, `create_by`, `update_by`, `create_time`, `update_time`, `remark`, `salt`) VALUES (102, 'minit', '00', NULL, '57a9f75fef8defd88307e01497e26fef24ef4075', '0', '0', NULL, NULL, 'admin', 'admin', '2025-07-26 18:52:59', '2025-07-26 18:55:40', NULL, '1753527258176');
COMMIT;

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `role_id` bigint NOT NULL COMMENT '角色ID',
  PRIMARY KEY (`user_id`,`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户和角色关联表';

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role` (`user_id`, `role_id`) VALUES (1, 1);
INSERT INTO `sys_user_role` (`user_id`, `role_id`) VALUES (100, 50);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
